<!DOCTYPE html>
<!--[if IE 8 ]>
<html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org"><!--<![endif]-->
<head>

    <!-- Basic Page Needs
    ================================================== -->
    <meta charset="utf-8"/>
    <title>登录注册</title>

    <!-- Mobile Specific Metas
    ================================================== -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>

    <!-- CSS
    ================================================== -->
    <link rel="stylesheet" href="css/style.css" th:href="@{/css/style.css}"/>
    <link rel="stylesheet" href="css/colors/green.css" th:href="@{/css/colors/green.css}" id="colors"/>

    <!--[if lt IE 9]>
    <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->

</head>

<body class="boxed">
<div id="wrapper">


    <!-- Header
        ================================================== -->
    <div th:replace="fragments/header :: header"></div>


    <!-- Titlebar
    ================================================== -->
    <section class="titlebar">
        <div class="container">
            <div class="sixteen columns">
                <h2></h2>

                <nav id="breadcrumbs">
                    <ul>
                        <li><a href="index.html">首页</a></li>
                        <li>登录注册</li>
                    </ul>
                </nav>
            </div>
        </div>
    </section>


    <!-- Content
    ================================================== -->

    <!-- Container -->
    <div class="container">

        <div class="six columns centered">

            <ul class="tabs-nav my-account">
                <li class=""><a href="#tab1">登录</a></li>
                <li><a href="#tab2">注册</a></li>
            </ul>

            <div class="tabs-container">
                <!-- Login -->
                <div class="tab-content" id="tab1" style="display: none;">

                    <h3 class="headline">Login</h3><span class="line" style="margin-bottom:20px;"></span>
                    <div class="clearfix"></div>

                    <form method="post" class="login" th:action="@{loginCheck}" th:object="${user}">

                        <p class="form-row form-row-wide">
                            <label for="username">账号: <span class="required">*</span></label>
                            <input type="text" class="input-text" name="username" id="username" th:field="*{username}"
                                   value=""/>
                        </p>

                        <p class="form-row form-row-wide">
                            <label for="password">密码: <span class="required">*</span></label>
                            <input class="input-text" type="password" name="password" id="password"
                                   th:field="*{password}"/>
                        </p>

                        <p class="form-row">
                            <input type="submit" class="button" name="login" value="登录"
                                   onclick="return checkLogin(this.form);"/>

                            <label for="rememberme" class="rememberme">
                                <input name="rememberme" type="checkbox" id="rememberme" value="forever"/> 记住我</label>
                        </p>

                        <p class="lost_password">
                            <a class="popup-with-zoom-anim color" href="#">? 忘记密码</a>
                        </p>

                        <p class="lost_password">
                            <a class="popup-with-zoom-anim color" href="#small-dialog"><i class="fa fa-info-circle"></i>管理员入口</a><br/>
                        </p>

                    </form>

                    <div id="small-dialog" class="zoom-anim-dialog mfp-hide">
                        <h2 class="margin-bottom-10">管理员登录</h2>
                        <form method="post" class="login" th:action="@{/adminLogin}" th:object="${admin}">
                            <p class="form-row form-row-wide">
                                <label for="username">管理员ID: <span class="required">*</span></label>
                                <input type="text" class="input-text" name="admin_id" id="admin_id" th:field="*{admin_id}" />
                            </p>
                            <p class="form-row form-row-wide">
                                <label for="password">密码: <span class="required">*</span></label>
                                <input class="input-text" type="password" name="admin_password" id="admin_password" th:field="*{password}" />
                            </p>
                            <p class="form-row">
                                <input type="submit" class="button" name="login" value="登录"/>
                            </p>
                        </form>
                    </div>

                </div>


                <!-- Register -->
                <div class="tab-content" id="tab2" style="display: none;">

                    <h3 class="headline">Register</h3><span class="line" style="margin-bottom:20px;"></span>
                    <div class="clearfix"></div>

                    <form method="post" class="register" th:action="@{registerCheck}" th:object="${user}">

                        <p class="form-row form-row-wide">
                            <label for="phone">手机号: <span class="required">*</span></label>
                            <input type="text" class="input-text" name="phone" id="phone" th:field="*{phone}" value=""/>
                        </p>


                        <p class="form-row form-row-wide">
                            <label for="reg_password">密码: <span class="required">*</span></label>
                            <input type="password" class="input-text" name="reg_password" id="reg_password"
                                   th:field="*{password}" placeholder="6~16位英文数字下划线组合"/>
                        </p>

                        <p class="form-row form-row-wide">
                            <label for="reg_password2">重复密码: <span class="required">*</span></label>
                            <input type="password" class="input-text" name="reg_password2" id="reg_password2"/>
                        </p>


                        <p class="form-row">
                            <input type="submit" class="button" name="register" value="注册"
                                   onclick="return checkRegister(this.form)"/>
                        </p>

                    </form>
                </div>
            </div>
        </div>
    </div>

    <div class="margin-top-50"></div>


    <!-- Footer
    ================================================== -->
    <div th:replace="fragments/footer :: footer"></div>

</div>

<!-- Java Script
================================================== -->
<div th:replace="fragments/scripts :: scripts"></div>


<!-- Style Switcher
================================================== -->
<div th:replace="fragments/styleswitcher :: styleswitcher"></div>


</body>
</html>